require('colors');
const moment = require('moment');

function info(logs) {
    let time = moment().format('YYYY-MM-DD HH:mm:ss SSS');
    console.log(`[${time}] [INFO] - ${logs}`.blue);
}

function debug(logs) {
    let time = moment().format('YYYY-MM-DD HH:mm:ss SSS');
    console.log(`[${time}] [DEBUG] - ${logs}`.cyan);
}

function warn(logs) {
    let time = moment().format('YYYY-MM-DD HH:mm:ss SSS');
    console.log(`[${time}] [WARN] - ${logs}`.yellow);
}

function error(logs) {
    let time = moment().format('YYYY-MM-DD HH:mm:ss SSS');
    console.log(`[${time}] [ERROR] - ${logs}`.red);
}

function fatal(logs) {
    let time = moment().format('YYYY-MM-DD HH:mm:ss SSS');
    console.log(`[${time}] [FATAL] - ${logs}`.magenta);
}

exports.debug = debug;
exports.info = info;
exports.warn = warn;
